<?php
/**
 * Created by PhpStorm.
 * User: 86182
 * Date: 2020/6/26
 * Time: 17:39
 */

namespace App\Utils;


class Show
{
    public static function success($code=200, $msg='ok', $data=[]){
        $result = array(
            'code' => $code,
            'msg' =>$msg,
            'data' =>$data
        );
        return json_encode($result);
    }

    public static function error($code=0, $msg='err', $data=[]){
        $result = array(
            'code' => $code,
            'msg' =>$msg,
            'data' =>$data
        );
        return json_encode($result);
    }



}